package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.News;
import com.xca.znb.model.imodel.ISaleHome;

import java.util.List;

public class SaleHomeImpl implements ISaleHome {
    private UserDAO userDAO ;
    public SaleHomeImpl(Context context){
        userDAO = new UserDAO(context);
    }
    @Override
    public double getDaySales(String phone, String time_day) {
        return userDAO.getTodaySale(phone, time_day);
    }

    @Override
    public double getMonthSales(String phone, String time_month) {
        return userDAO.getMonthSale(phone, time_month);
    }

    @Override
    public double getTotalSales(String phone) {
        return userDAO.getTotalSale(phone);
    }

    @Override
    public List<News> getNews() {
        return userDAO.getNews();
    }
}
